.class public Les/jb;
.super Ljava/lang/Object;
.source "BGMPlayer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/jb$d;,
        Les/jb$c;
    }
.end annotation


# instance fields
.field private a:I

.field private b:Les/z9;

.field private c:Les/z9$d;

.field private d:Les/z9$e;

.field private e:Ljava/lang/String;

.field private f:Landroid/util/Pair;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/Pair<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private g:F

.field private h:Z

.field private i:I

.field private j:Les/jb$c;

.field private k:Les/jb$d;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput v0, p0, Les/jb;->a:I

    .line 3
    new-instance v0, Les/jb$a;

    invoke-direct {v0, p0}, Les/jb$a;-><init>(Les/jb;)V

    iput-object v0, p0, Les/jb;->c:Les/z9$d;

    .line 4
    new-instance v0, Les/jb$b;

    invoke-direct {v0, p0}, Les/jb$b;-><init>(Les/jb;)V

    iput-object v0, p0, Les/jb;->d:Les/z9$e;

    const/high16 v0, 0x3f800000    # 1.0f

    .line 5
    iput v0, p0, Les/jb;->g:F

    return-void
.end method

.method static synthetic a(Les/jb;I)I
    .locals 0

    .line 1
    iput p1, p0, Les/jb;->a:I

    return p1
.end method

.method private a(III)Landroid/util/Pair;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(III)",
            "Landroid/util/Pair<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

    const/4 v0, 0x0

    .line 11
    invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I

    move-result p1

    invoke-static {p1, p3}, Ljava/lang/Math;->min(II)I

    move-result p1

    if-ltz p2, :cond_0

    .line 12
    invoke-static {p1, p2}, Ljava/lang/Math;->max(II)I

    move-result p2

    invoke-static {p2, p3}, Ljava/lang/Math;->min(II)I

    move-result p3

    .line 13
    :cond_0
    new-instance p2, Landroid/util/Pair;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p3

    invoke-direct {p2, p1, p3}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V

    return-object p2
.end method

.method static synthetic a(Les/jb;)Z
    .locals 0

    .line 2
    iget-boolean p0, p0, Les/jb;->h:Z

    return p0
.end method

.method static synthetic b(Les/jb;)Les/jb$c;
    .locals 0

    .line 1
    iget-object p0, p0, Les/jb;->j:Les/jb$c;

    return-object p0
.end method

.method private b(I)Ljava/lang/String;
    .locals 1

    if-eqz p1, :cond_4

    const/4 v0, 0x1

    if-eq p1, v0, :cond_3

    const/4 v0, 0x2

    if-eq p1, v0, :cond_2

    const/4 v0, 0x3

    if-eq p1, v0, :cond_1

    const/4 v0, 0x4

    if-eq p1, v0, :cond_0

    const-string p1, "STATE_UNKNOWN"

    return-object p1

    :cond_0
    const-string p1, "STATE_COMPLETE"

    return-object p1

    :cond_1
    const-string p1, "STATE_PAUSED"

    return-object p1

    :cond_2
    const-string p1, "STATE_PLAYING"

    return-object p1

    :cond_3
    const-string p1, "STATE_READY"

    return-object p1

    :cond_4
    const-string p1, "STATE_IDLE"

    return-object p1
.end method

.method static synthetic c(Les/jb;)Les/jb$d;
    .locals 0

    .line 1
    iget-object p0, p0, Les/jb;->k:Les/jb$d;

    return-object p0
.end method


# virtual methods
.method public a()I
    .locals 2

    .line 18
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return v0

    .line 19
    :cond_0
    iget-object v1, p0, Les/jb;->f:Landroid/util/Pair;

    if-eqz v1, :cond_1

    .line 20
    iget-object v0, v1, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iget-object v1, p0, Les/jb;->f:Landroid/util/Pair;

    iget-object v1, v1, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    sub-int/2addr v0, v1

    return v0

    .line 21
    :cond_1
    invoke-virtual {v0}, Les/z9;->b()I

    move-result v0

    return v0
.end method

.method public a(I)I
    .locals 4

    .line 22
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "seek to "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, " ms when state is "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Les/jb;->a:I

    invoke-direct {p0, v1}, Les/jb;->b(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "BGMPlayer"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 23
    iget v0, p0, Les/jb;->a:I

    const/4 v2, -0x1

    if-nez v0, :cond_0

    .line 24
    iput p1, p0, Les/jb;->i:I

    return v2

    .line 25
    :cond_0
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-nez v0, :cond_1

    .line 26
    iput p1, p0, Les/jb;->i:I

    return v2

    :cond_1
    const/4 v0, 0x0

    .line 27
    iput v0, p0, Les/jb;->i:I

    .line 28
    invoke-virtual {p0}, Les/jb;->a()I

    move-result v0

    if-gtz v0, :cond_2

    const-string p1, "seek when duration <= 0"

    .line 29
    invoke-static {v1, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    return v2

    :cond_2
    const/4 v1, 0x4

    if-le p1, v0, :cond_3

    .line 30
    iget-boolean v2, p0, Les/jb;->h:Z

    if-nez v2, :cond_3

    .line 31
    iget-object p1, p0, Les/jb;->b:Les/z9;

    invoke-virtual {p1}, Les/z9;->d()V

    .line 32
    iput v1, p0, Les/jb;->a:I

    return v0

    .line 33
    :cond_3
    iget v2, p0, Les/jb;->a:I

    if-ne v2, v1, :cond_4

    const/4 v1, 0x3

    .line 34
    iput v1, p0, Les/jb;->a:I

    .line 35
    :cond_4
    iget-object v1, p0, Les/jb;->f:Landroid/util/Pair;

    iget-object v1, v1, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    rem-int/2addr p1, v0

    add-int/2addr v1, p1

    .line 36
    iget-object p1, p0, Les/jb;->b:Les/z9;

    int-to-long v2, v1

    invoke-virtual {p1, v2, v3}, Les/z9;->a(J)V

    return v1
.end method

.method public a(F)V
    .locals 1

    .line 14
    iput p1, p0, Les/jb;->g:F

    .line 15
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-eqz v0, :cond_0

    .line 16
    invoke-virtual {v0, p1}, Les/z9;->b(F)V

    :cond_0
    return-void
.end method

.method public a(II)V
    .locals 1

    .line 6
    new-instance v0, Landroid/util/Pair;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-direct {v0, p1, p2}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V

    invoke-virtual {p0, v0}, Les/jb;->a(Landroid/util/Pair;)V

    return-void
.end method

.method public a(Landroid/util/Pair;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/util/Pair<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Integer;",
            ">;)V"
        }
    .end annotation

    if-nez p1, :cond_0

    return-void

    .line 7
    :cond_0
    iget v0, p0, Les/jb;->a:I

    if-eqz v0, :cond_2

    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-nez v0, :cond_1

    goto :goto_0

    .line 8
    :cond_1
    iget-object v0, p1, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iget-object v1, p1, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iget-object v2, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v2}, Les/z9;->b()I

    move-result v2

    invoke-direct {p0, v0, v1, v2}, Les/jb;->a(III)Landroid/util/Pair;

    move-result-object v0

    iput-object v0, p0, Les/jb;->f:Landroid/util/Pair;

    .line 9
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0, p1}, Les/z9;->a(Landroid/util/Pair;)V

    return-void

    .line 10
    :cond_2
    :goto_0
    iput-object p1, p0, Les/jb;->f:Landroid/util/Pair;

    return-void
.end method

.method public a(Les/jb$c;)V
    .locals 0

    .line 37
    iput-object p1, p0, Les/jb;->j:Les/jb$c;

    return-void
.end method

.method public a(Les/jb$d;)V
    .locals 0

    .line 38
    iput-object p1, p0, Les/jb;->k:Les/jb$d;

    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 1

    .line 3
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 4
    iput-object p1, p0, Les/jb;->e:Ljava/lang/String;

    return-void

    .line 5
    :cond_0
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "The path is null!"

    invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public a(Z)V
    .locals 0

    .line 17
    iput-boolean p1, p0, Les/jb;->h:Z

    return-void
.end method

.method public b()Z
    .locals 2

    .line 2
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-eqz v0, :cond_0

    iget v0, p0, Les/jb;->a:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method public c()V
    .locals 2

    .line 2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "pause when state is "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Les/jb;->a:I

    invoke-direct {p0, v1}, Les/jb;->b(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "BGMPlayer"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    iget v0, p0, Les/jb;->a:I

    if-nez v0, :cond_0

    return-void

    .line 4
    :cond_0
    iget-object v1, p0, Les/jb;->b:Les/z9;

    if-eqz v1, :cond_2

    const/4 v1, 0x4

    if-eq v0, v1, :cond_1

    const/4 v0, 0x3

    .line 5
    iput v0, p0, Les/jb;->a:I

    .line 6
    :cond_1
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0}, Les/z9;->d()V

    :cond_2
    return-void
.end method

.method public d()Z
    .locals 4

    const-string v0, "BGMPlayer"

    const-string v1, "prepare BGMPlayer"

    .line 1
    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Les/z9;->g()V

    .line 4
    :cond_0
    new-instance v0, Les/z9;

    invoke-direct {v0}, Les/z9;-><init>()V

    iput-object v0, p0, Les/jb;->b:Les/z9;

    .line 5
    iget-object v1, p0, Les/jb;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Les/z9;->a(Ljava/lang/String;)Z

    .line 6
    iget-object v0, p0, Les/jb;->b:Les/z9;

    iget v1, p0, Les/jb;->g:F

    invoke-virtual {v0, v1}, Les/z9;->b(F)V

    .line 7
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0}, Les/z9;->e()Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_3

    .line 8
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0}, Les/z9;->b()I

    move-result v0

    .line 9
    iget-object v2, p0, Les/jb;->f:Landroid/util/Pair;

    if-nez v2, :cond_1

    .line 10
    new-instance v2, Landroid/util/Pair;

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-direct {v2, v1, v3}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V

    iput-object v2, p0, Les/jb;->f:Landroid/util/Pair;

    .line 11
    :cond_1
    iget-object v1, p0, Les/jb;->f:Landroid/util/Pair;

    iget-object v1, v1, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iget-object v2, p0, Les/jb;->f:Landroid/util/Pair;

    iget-object v2, v2, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v2, Ljava/lang/Integer;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    invoke-direct {p0, v1, v2, v0}, Les/jb;->a(III)Landroid/util/Pair;

    move-result-object v0

    iput-object v0, p0, Les/jb;->f:Landroid/util/Pair;

    .line 12
    iget-object v1, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v1, v0}, Les/z9;->a(Landroid/util/Pair;)V

    .line 13
    iget-object v0, p0, Les/jb;->b:Les/z9;

    iget-object v1, p0, Les/jb;->c:Les/z9$d;

    invoke-virtual {v0, v1}, Les/z9;->a(Les/z9$d;)V

    .line 14
    iget-object v0, p0, Les/jb;->b:Les/z9;

    iget-object v1, p0, Les/jb;->d:Les/z9$e;

    invoke-virtual {v0, v1}, Les/z9;->a(Les/z9$e;)V

    const/4 v0, 0x1

    .line 15
    iput v0, p0, Les/jb;->a:I

    .line 16
    iget v1, p0, Les/jb;->i:I

    if-eqz v1, :cond_2

    .line 17
    invoke-virtual {p0, v1}, Les/jb;->a(I)I

    :cond_2
    return v0

    .line 18
    :cond_3
    iput v1, p0, Les/jb;->a:I

    return v1
.end method

.method public e()V
    .locals 3

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "start when state is "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Les/jb;->a:I

    invoke-direct {p0, v1}, Les/jb;->b(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "BGMPlayer"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    iget v0, p0, Les/jb;->a:I

    if-nez v0, :cond_1

    .line 3
    sget-boolean v0, Les/u6;->a:Z

    if-nez v0, :cond_0

    return-void

    .line 4
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "This player has not been prepared!"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 5
    :cond_1
    iget-object v2, p0, Les/jb;->b:Les/z9;

    if-eqz v2, :cond_3

    const/4 v2, 0x4

    if-ne v0, v2, :cond_2

    .line 6
    iget-boolean v0, p0, Les/jb;->h:Z

    if-nez v0, :cond_2

    const-string v0, "start when state is STATE_COMPLETE in no loop mode"

    .line 7
    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 8
    :cond_2
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0}, Les/z9;->f()V

    const/4 v0, 0x2

    .line 9
    iput v0, p0, Les/jb;->a:I

    :cond_3
    :goto_0
    return-void
.end method

.method public f()V
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "stop when state is "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Les/jb;->a:I

    invoke-direct {p0, v1}, Les/jb;->b(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "BGMPlayer"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Les/jb;->b:Les/z9;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 3
    iput v1, p0, Les/jb;->a:I

    const/4 v1, 0x0

    .line 4
    invoke-virtual {v0, v1}, Les/z9;->a(Les/z9$d;)V

    .line 5
    iget-object v0, p0, Les/jb;->b:Les/z9;

    invoke-virtual {v0}, Les/z9;->g()V

    .line 6
    iput-object v1, p0, Les/jb;->b:Les/z9;

    :cond_0
    return-void
.end method
